package com.pomr.model.form;

import java.io.Serializable;

import com.pomr.model.sys.Agency;
import com.pomr.model.sys.City;
import com.pomr.model.sys.Coutry;
import com.pomr.model.sys.Province;

public class AgencyUp implements Serializable{
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public String getCoutry() {
		return coutry;
	}
	public void setCoutry(String coutry) {
		this.coutry = coutry;
	}
	public String getAddr() {
		return addr;
	}
	public void setAddr(String addr) {
		this.addr = addr;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public String getParentAgency() {
		return parentAgency;
	}
	public void setParentAgency(String parentAgency) {
		this.parentAgency = parentAgency;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	private String name;//机构名称
	private String province;//省
	private String city;//市
	private String coutry;//县
	private String addr;//详细地址
	private String tel;//电话
	private String parentAgency;//上级机构编号  祖机构编号3702
	private String remark;//备注
	
	public Agency getLoadAgency() throws Exception{
		Agency ag = new Agency();
		ag.setName(this.name);
		
		//地址
		Province p = new Province();
		p.setId(this.province);
		ag.setProvince(p);
		City c = new City();
		c.setId(this.city);
		ag.setCity(c);
		Coutry ct = new Coutry();
		ct.setId(this.coutry);
		ag.setCoutry(ct);
		ag.setAddr(this.addr);
		
		ag.setTel(this.tel);
		ag.setRemark(this.remark);
		
		return ag;
	}

}
